package com.pg.agent.engine.client.model.agent;

import com.alibaba.fastjson.JSONObject;
import com.pg.agent.engine.client.model.ComResponse;
import com.pg.agent.engine.client.model.ComponentInParam;
import com.pg.agent.engine.client.model.llm.CallLog;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * Agent Compile 返回结果
 * @author huhuaping
 * @date 2023/10/30 17:06
 */
@Data
public class AgentCompileResult implements Serializable {
    private static final long serialVersionUID = 9120606095133429207L;
    /**
     * 最后提示模板
     */
    private String lastPrompt;
    /**
     * 系统提示模板
     */
    private String systemPrompt;


    private String response;
    /**
     * 响应字典
     */
    private ComResponse comResponse;

    /**
     * LLM结果调用
     */
    private CallLog callLog;

    /**
     * 是否需要单独调用大模型
     */
    private boolean flag;

    /**
     * 组件结果
     */
    private Map<Long, JSONObject> componentResult;

    /**
     * 组件需要的入参
     */
    private  List<ComponentInParam> componentUserInPutParam;

    private String agentResponse;

    private String agentResult;

    /**
     * 无参构造方法
     */
    public AgentCompileResult() {
    }

    /**
     * 全参构造方法
     *
     * @param lastPrompt   最后提语
     * @param systemPrompt 系统提语
     * @param comResponse  组件响应对象
     */
    public AgentCompileResult(String lastPrompt, String systemPrompt, ComResponse comResponse) {
        this.lastPrompt = lastPrompt;
        this.systemPrompt = systemPrompt;
        this.comResponse = comResponse;
    }
}
